<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
<head>
 	<%@include file="../base/csslink.jsp" %>
</head>
<body class="skin-blue sidebar-mini">
<div class="wrapper">	
 	<%@include file="../base/header.jsp" %>
 	<%@include file="../base/sidebar.jsp" %>
 	
 <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
	<section class="content-header">
	  <h1>${not empty baseStudent?"修改":"新增"}<small>${not empty baseStudent?"Edit":"Add"}</small></h1>
	  <ol class="breadcrumb"><li><i class="fa fa-dashboard"></i>&nbsp;&nbsp;学生信息管理</li></ol>
	</section>
	
    <!-- Main content -->
    <section class="content container-fluid">
 
      <div class="box box-default" style="min-height: 250px;">
      	<div class="box-body">
      		<form class="row-fluid form-horizontal" method="post" id="baseStudentForm" action="student/${not empty baseStudent?'edit':'add'}.action">
      			<input type="hidden" name="id" id="id" value="${baseStudent.id}">
  				<div class="form-group">      				
      				<label class="col-sm-2 col-xs-4 control-label">姓名</label>
      				<div class="col-sm-3 col-xs-8">
      					<input type="text" class="form-control" id="name" name="name" placeholder="请输入您的姓名" value="${baseStudent.name }">
  					</div>
      				<div class="clearfix visible-xs-block"></div>   
					<label class="col-sm-2 col-xs-4 control-label">性别</label>
      				<div class="col-sm-3 col-xs-8">
      					<select class="form-control" name="gender">
		    				<option value="男" ${baseStudent.gender == "男"?"selected":"" }>男</option>
		    				<option value="女" ${baseStudent.gender == "女"?"selected":"" }>女</option>
		    			</select>
					</div>	  
      			</div>
      			<div class="hr hr-dotted"></div>
  				<div class="form-group">   
					<label class="col-sm-2 col-xs-4 control-label">年龄</label>
      				<div class="col-sm-3 col-xs-8">
      					<input type="text" class="form-control" id="age" name="age" placeholder="请输入您的年龄" value="${baseStudent.age }">
					</div>
      			</div> 
      			<div class="hr hr-dotted"></div>
      			<div class="form-group">   
					<label class="col-sm-2 col-xs-4 control-label">头像</label>
      				<div class="col-sm-8 col-xs-8">
      					<div id="bcd" style="max-width:100px;">
							<c:if test="${not empty baseStudent.headPic}">
				        		<img src="showPic.action?fileName=${baseStudent.headPic }" style="max-height:50px;" />
				        	</c:if>
						</div>
						<div class="input-group">
							<input type="file" class="form-control" id="abc" name="abc">
							<span class="input-group-btn"> 
								<button type="button" class="btn btn-warning" id="uploadButton">上传</button>
		                    </span>
				        </div>
					    <input type="hidden" id="headPic" name="headPic" value="${lessionUserInfo.headPic }">
					</div>
      			</div> 
      			<div class="hr hr-dotted"></div>
      			<div class="col-sm-12 text-center" lang="submitButtonGroup">
			      <button type="submit" class="btn btn-success">&nbsp;&nbsp;提交&nbsp;&nbsp;</button>
			      <button type="button" class="btn btn-primary" onclick="history.back()">&nbsp;&nbsp;返回&nbsp;&nbsp;</button>
			   </div>
      		</form><!-- /.row-fluid-->    		
            <div class="btn-group btn-group-custom-fixed-float">
				<a class="btn btn-sm btn-default" onclick="history.back()">返回</a>
			</div>
      	</div><!-- /.box-body-->
      	
      </div><!-- /.box-->

    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->
  
 	<%@include file="../base/footer.jsp" %>
      
</div>
<!-- ./wrapper -->
<%@include file="../base/jslib.jsp" %>
<script src="resources/js/ajaxfileupload.js"></script>
<script src="resources/js/student_edit.js" charset="utf-8"></script>
</body>
</html>